home *** CD-ROM | disk | FTP | other *** search
/ Clickx 31 / Clickx 31.iso / assets / software / MyServer-win32-0.8.2.exe / web / documentation / texts / performance.htm < prev    next >
Encoding:
Extensible Markup Language  |  2005-06-22  |  5.2 KB  |  128 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  3.   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  5. <head>
  6. <title>MyServer Documentation - Performance Tuning - www.myserverproject.net</title>
  7. <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  8. <meta http-equiv="Content-Style-Type" content="text/css" />
  9. <link rel="stylesheet" type="text/css" href="../style/myserver.css" />
  10. </head>
  11. <body>
  12. <table class="center" width="95%">
  13. <tr>
  14. <td class="center">
  15.       <h1 class="title">PERFORMANCE TUNING</h1><br />
  16.         
  17.         Here you can see a few options you can set to tune the performance of 
  18.         your webserver.<br />
  19.       
  20. <h2 class="title">Threads Tuning:</h2>
  21. In the myserver.xml file you can setup the amount of threads MyServer will use. In the lines below, you configure the two configurable parameters <span class="code">NTHREADS_STATIC</span> and <span class="code">NTHREADS_MAX</span>, the first one is used to define number of threads always alive, the second one is used to define the highest number of threads that myserver can create:<br />
  22.  
  23. <br />
  24. <br />
  25.  
  26. <span class="code">
  27. <NTHREADS_STATIC>10</NTHREADS_STATIC><br />
  28. <NTHREADS_MAX>10</NTHREADS_MAX>
  29. </span>
  30.  
  31. <br />
  32. <br />
  33. <h2 class="title">Buffer Size:</h2>
  34. You can set  the size of the Buffers used by MyServer, by setting the line below, in the myserver.xml file:
  35. <br />
  36. <p class="code">
  37. <BUFFER_SIZE>102400</BUFFER_SIZE><br />
  38. </p>
  39. <p>
  40. Just change the default value 102400 to your desired number. Remember that, in fact, your buffer will be twice the value you set here (in Bytes), multiplied by the number of running threads.
  41. <br />
  42. <br />
  43. <h2 class="title">Connection Timeout:</h2>
  44.  
  45. In <span class="code">myserver.xml</span>, you can set the timeout for client connections to your server, in the line below:
  46. <br />
  47. <br />
  48. <p class="code">
  49. <CONNECTION_TIMEOUT>60</CONNECTION_TIMEOUT><br />
  50. </p>
  51. <p>
  52. The time unit is seconds. So, in the line above, if your client doesn't access your site for more than 60 seconds, the connection will be closed. Or if you prefer, set this value to 0 and you won't have HTTP Keep-Alive Connections.
  53. <br />
  54. <br />
  55. <h2 class="title">Max Connections:</h2>
  56. You can change the default maximum number of connections your webserver will accept, by changing the line below in <span class="code">myserver.xml</span>:<br />
  57. <p class="code">
  58. <MAX_CONNECTIONS>0</MAX_CONNECTIONS><br />
  59. </p>
  60. <p>
  61. The default value 0 means you will accept infinite connections. Any other value will limit how many users will be accessing your server.
  62.  
  63. <br />
  64. <br />
  65. <h2 class="title">Max FastCGI Servers:</h2>
  66. MyServer lets you configure the maximum number of FastCGI servers allowed to run, by changing the value in the line below, <span class="code">in myserver.xml</span>:<br />
  67. <p class="code">
  68. <FASTCGI_MAX_SERVERS>10</FASTCGI_MAX_SERVERS><br />
  69. </p>
  70. <p>
  71.  
  72. <h2 class="title">Setting CGI Timeout:</h2>
  73.  
  74. You can set the default timeout for your CGI scripts in MyServer by changing the value of the variable CGI_TIMEOUT in your <span class="code">myserver.xml</span> file.<br />
  75. Just change the line below to fit your need:<br />
  76. <p class="code">
  77. <CGI_TIMEOUT>15</CGI_TIMEOUT><br />
  78. </p>
  79.  
  80. <p>
  81. The configuration above would mean you are setting the CGI Timeout to 15 seconds (unit is "seconds")
  82.  
  83. <br />
  84. <br />
  85. <h2 class="title">Setting data throttling:</h2>
  86.  
  87. You can set the data throttling rate for connections in MyServer (by default, it's disabled) by adding a line like the following:
  88. <p class="code">
  89. <THROTTLING_RATE>1024</THROTTLING_RATE><br />
  90. </p>
  91. <p>
  92. (Unit is bytes/second)<br />
  93. If that same line is available in <span class="code">virtualhosts.xml</span>, it will enable and configure data throttling for the corresponding virtual host.<br />
  94. <br />
  95.  
  96. Also, you can configure the data throttling for individual directories, using these configurations in your security file:<br />
  97. <p class="code">
  98. <USER NAME="Guest" PASS="" READ="TRUE" WRITE="TRUE" BROWSE="TRUE"<br />
  99.         EXECUTE="TRUE" THROTTLING_RATE="1024"/><br />
  100. </p>
  101. <p>
  102. With that, you'd enabling the trottling of 1024  bytes/second for the user Guest.<br />
  103. If you add a line like the following, you will be enabling throttling for a file named "bigfile":<br />
  104. <p class="code">
  105. <ITEM FILE="bigfile" READ="TRUE" WRITE="FALSE" EXECUTE="FALSE"<br />
  106.         THROTTLING_RATE="1024" /><br />
  107. You can also mix the two possibilities and set this configuration for a specified user on a single file:<br />
  108. <ITEM FILE="bigfile" READ="TRUE" WRITE="FALSE" EXECUTE="FALSE"><br />
  109. <USER NAME="Guest" PASS="" READ="TRUE" WRITE="TRUE" BROWSE="TRUE"<br />
  110.         EXECUTE="TRUE" THROTTLING_RATE="1024"/><br />
  111. </ITEM><br /><br />
  112. </p>
  113. <p>
  114. This is the order of checking for data throttling configuration:<br />
  115. 1) User & file(USER attribute inside ITEM).<br />
  116. 2) File(ITEM attribute).<br />
  117. 3) User(USER attribute).<br />
  118. 4) Virtual host(virtualhosts.xml file).<br />
  119. 5) Server configuration(myserver.xml file).<br />
  120. <br />
  121. <br />
  122.  
  123. </td>
  124. </tr>
  125. </table>
  126. </body>
  127. </html>
  128.